package org.wei.p2p.account.service;

import org.wei.p2p.account.entity.Account;
import com.baomidou.mybatisplus.extension.service.IService;
import org.wei.p2p.api.account.model.AccountDTO;
import org.wei.p2p.api.account.model.AccountRegisterDTO;
import org.wei.p2p.api.account.model.VerificationInfoDTO;

/**
 * <p>
 * 账号信息 服务类.
 * </p>
 *
 * @author wei
 * @date 2022-04-24
 */
public interface IAccountService extends IService<Account> {

    VerificationInfoDTO getSMSCode(String mobile);

    /**
     * 校验手机号和验证码
     * @param mobile
     * @param key
     * @param code
     * @return
     */
    Integer checkMobile(String mobile, String key, String code);

    /**
     * 账户注册
     * @param registerDTO 注册信息
     * @return
     */
    AccountDTO register(AccountRegisterDTO registerDTO);
}
